zz_

isNegative.ts

zzmq.dev@gmail.com/shirt[add-isnegative-n-function-new-file] / isNegative.ts @ 2490045d Download
Ladder Summary
  • file Ensure isNegative function exists and correctly returns true for negative numbers
/**
 * Returns true if the given number is negative.
 * @param n - The number to check.
 * @returns true if n is less than 0, otherwise false.
 */
export function isNegative(n: number): boolean {
    return n < 0;
}